# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python2-nfcpy
pkgver=0.13.5
pkgrel=2
pkgdesc='A Python module to read/write NFC tags or communicate with another NFC device.'
arch=('any')
url='https://github.com/nfcpy/nfcpy/'
license=('EUPL')
depends=('python2')
makedepends=('python2-setuptools')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/pynfc-$pkgver.tar.gz")
sha512sums=('565132768d3f04365ac4110a52cc36c71e87a6b03446872f456b2e7d771fdb067157f4e28155bb8b465e2593b8cbefb86bd8fd52e38852d93f4741e9f0102010')

build() {
  cd "nfcpy-$pkgver"

  python2 setup.py build
}

package() {
  cd "nfcpy-$pkgver"

  python2 setup.py install --prefix=/usr --root="$pkgdir" --optimize=1 \
    --skip-build
}

